import { createWebHistory, createRouter } from 'vue-router'
import Index from '../views/home/index.vue'
import Gou from '../views/home/gou.vue'
import Wo from '../views/home/wo.vue'
import Xq from '../views/xq.vue'
import Goods from '../views/goods.vue'
import Login from '../views/login.vue'
import Fl from '../views/home/fl.vue'
import Sy from '../views/home/sy.vue'


const routes = [
    {
        path: '/home',
        component: Index,
        children: [
            {
                path: 'fl',
                component: Fl,
            },
            {
                path: 'gou',
                component: Gou,
            },
            {
                path: 'wo',
                component: Wo,
            },
            {
                path: 'sy',
                component: Sy,
            },
        ]

    },
    { path: '/login', component: Login },
    { path: '/xq', component: Xq },
    { path: '/goods', component: Goods },
]

const router = createRouter({
    history: createWebHistory(),
    routes,
})

export default router